/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import React, { useState } from 'react';
import { PageContainer } from '@ant-design/pro-layout';
import NoticePage from './components/NoticePage';
import { Tabs } from 'antd';

const NoticeVerify: React.FC = () => {
  const [activeKey, setActiveKey] = useState<string>('NoticePage');
  const tabList = [
    {
      tab: '待审核',
      key: 'todo',
    },
    {
      tab: '已同意',
      key: 'agreed',
    },
    {
      tab: '已拒绝',
      key: 'refused',
    },
  ];

  const handleTabChange = (key: string) => setActiveKey(key);

  return (
    <PageContainer>
      <Tabs onChange={handleTabChange}>
        {tabList.map((item) => (
          <Tabs.TabPane key={item.key} tab={item.tab}>
            <NoticePage type={item.key} activeKey={activeKey} />
          </Tabs.TabPane>
        ))}
      </Tabs>
    </PageContainer>
  );
};

export default NoticeVerify;
